
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>口子师兄 - 注册</title>
<script type="text/javascript" src="http://localhost:82/statics/js/jquery.min.js"></script>
<script type="text/javascript" src="http://localhost:82/statics/js/formvalidator.js" charset="UTF-8"></script>
<script type="text/javascript" src="http://localhost:82/statics/js/formvalidatorregex.js" charset="UTF-8"></script>
<link href="http://localhost:82/statics/css/reset.css" rel="stylesheet" type="text/css" />
<link href="http://localhost:82/statics/css/dialog_simp.css" rel="stylesheet" type="text/css" />
<link href="font/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
<link href="font/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">

<link href="font/animate.min.css" rel="stylesheet">
<link href="font/style.min862f.css?v=4.1.0" rel="stylesheet">
<style type="text/css">
#s{
        color: red;
    }
body{
        background: url(./font/login-background.jpg) no-repeat center fixed;
    }
</style>

</head>
<body class="gray-bg">
	<div class="middle-box text-center loginscreen  animated fadeInDown">
        <div>
            <div>

                <h1 class="logo-name"></h1>

            </div>
            <h3 id="s">注册</h3>

            <form class="m-t" role="form" method="post" action="index.php?m=member&c=index&a=register&siteid=1" id="myform">
            	<input type="hidden" name="siteid" value="1" />
            	<input name="modelid" type="hidden" value="10"/>

                <div class="form-group">
                    <input type="text" id="username" name="username" class="form-control" placeholder="手机号" required=""  maxlength="11"  value="" >
                </div>

                <div class="form-group">
                    <input type="password"  id="password" name="password"  class="form-control" placeholder="输入最少6位密码" required="6"  maxlength="22"  value="" >
                </div>

                <div class="form-group">
                    <input type="password"  name="pwdconfirm" id="pwdconfirm" class="form-control" placeholder="确认密码" required="6"  maxlength="22" value="" >
                </div>

                <div class="form-group">
                    <input type="text" id="email" name="email" class="form-control" placeholder="邮箱" required=""  value="" >
                </div>

                <div class="form-group">
                    <input type="text" id="nickname" name="nickname" class="form-control" placeholder="昵称"  maxlength="18   " required=""  value="" >
                </div>

                                
                </div>
                <button type="submit"  name="dosubmit" class="btn btn-primary block full-width m-b login_tj_btn">注 册</button>


                    <a href="http://localhost:82/testlogin.php"><button type="button" class="btn btn-danger block full-width"><?php echo '@'.date('Y',time())?>登录</button></a>

            </form>
        </div>
    </div>
<script language="JavaScript">
<!--
$(function(){
	$.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
	$(function(){
        $("#username").blur(function(){
        	//http://localhost:82/index.php?clientid=username&username=111&m=member&c=index&a=public_checkname_ajax&_=1516089326733
			//http://localhost:82/index.php?clientid=email&email=56783998%40qq.com&m=member&c=index&a=public_checkemail_ajax&_=1516089475579
			//http://localhost:82/index.php?clientid=nickname&nickname=1111&m=member&c=index&a=public_checknickname_ajax&_=1516089522095
           	var username = $("#username").val();
            $.ajax({
                'url': "http://localhost:82/index.php?clientid=username&username="+username+"&m=member&c=index&a=public_checkname_ajax&_=1516089326733",
               	'type':"get",
                success:function(re){
                	if(re == 1){
                		return true;
                	}else{
                		confirm("账号已存在");
                	}
                }  
           });           
        });
    });
	
	
	$("#pwdconfirm").formValidator({onshow:" ",onfocus:" ",oncorrect:"密码输入一致"}).compareValidator({desid:"password",operateor:"=",onerror:"两次密码不同。"});
	$(function(){
        $("#email").blur(function(){
        	//http://localhost:82/index.php?clientid=username&username=111&m=member&c=index&a=public_checkname_ajax&_=1516089326733
			//http://localhost:82/index.php?clientid=email&email=56783998%40qq.com&m=member&c=index&a=public_checkemail_ajax&_=1516089475579
			//http://localhost:82/index.php?clientid=nickname&nickname=1111&m=member&c=index&a=public_checknickname_ajax&_=1516089522095
           	var email = $("#email").val();
            $.ajax({
                'url': "http://localhost:82/index.php?clientid=email&email="+email+"&m=member&c=index&a=public_checkemail_ajax&_=1516089475579",
               	'type':"get",
                success:function(re){
                	if(re == 1){
                		return true;
                	}else{
                		confirm('非法邮箱！');
                	}
                }  
           });           
        });
    });
    $(function(){
        $("#nickname").blur(function(){
        	//http://localhost:82/index.php?clientid=username&username=111&m=member&c=index&a=public_checkname_ajax&_=1516089326733
			//http://localhost:82/index.php?clientid=email&email=56783998%40qq.com&m=member&c=index&a=public_checkemail_ajax&_=1516089475579
			//http://localhost:82/index.php?clientid=nickname&nickname=1111&m=member&c=index&a=public_checknickname_ajax&_=1516089522095
           	var nickname = $("#nickname").val();
            $.ajax({
                'url': "http://localhost:82/index.php?clientid=nickname&nickname="+nickname+"&m=member&c=index&a=public_checknickname_ajax&_=1516089522095",
               	'type':"get",
                success:function(re){
                	if(re == 1){
                		return true;
                	}else{
                		confirm('昵称已存在');
                	}
                }  
           });           
        });
    });

	$(":checkbox[name='protocol']").formValidator({tipid:"protocoltip",onshow:"请阅读协议",onfocus:"请阅读协议"}).inputValidator({min:1,onerror:"请阅读协议"});
	
		$("#mobile_verify").formValidator({onshow:"请输入手机收到的验证码",onfocus:"请输入手机收到的验证码"}).inputValidator({min:1,onerror:"请输入手机收到的验证码"}).ajaxValidator({
					type : "get",
					url : "api.php",
					data :"op=sms_idcheck&action=id_code",
					datatype : "html",
										async:"false",
					success : function(data){
						if( data == "1" ) {
							return true;
						} else {
  							return false;
						}
					},
					buttons: $("#dosubmit"),
					onerror : "验证码错误",
					onwait : "请稍候..."
				});

	
	});

function show_protocol() {
	art.dialog({lock:false,title:'会员注册协议',id:'protocoliframe', iframe:'?m=member&c=index&a=register&protocol=1',width:'500',height:'310',yesText:'同意'}, function(){
		$("#protocol").attr("checked",true);
	});
}

//-->
</script>


</body>
</html>